Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: wait for journal to rotate in testLogs #19590

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

jelly
Copy link
Member

@jelly jelly commented Nov 8, 2023

In our CI the testLogs sometimes does not get a START and then fails. From the failed log it looks like this is due to journal being rotated. The user test case already sleeps to let journalctl settle so now we unify this approach.

Nov 08 13:13:09 ubuntu systemd[1]: Started test.service - Test Service.
Nov 08 13:13:09 ubuntu test-service[2427]: START
Nov 08 13:13:09 ubuntu systemd-journald[271]: Received client request to rotate journal.

Nov 08 13:19:51 ubuntu systemd-journald[271]: Received client request to rotate journal.
Nov 08 13:19:52 ubuntu test-service[2480]: START
Nov 08 13:19:57 ubuntu test-service[2480]: WORKING

In our CI the testLogs sometimes does not get a `START` and then fails.
From the failed log it looks like this is due to journal being rotated.
The user test case already sleeps to let journalctl settle so now we
unify this approach.

Nov 08 13:13:09 ubuntu systemd[1]: Started test.service - Test Service.
Nov 08 13:13:09 ubuntu test-service[2427]: START
Nov 08 13:13:09 ubuntu systemd-journald[271]: Received client request to rotate journal.

Nov 08 13:19:51 ubuntu systemd-journald[271]: Received client request to rotate journal.
Nov 08 13:19:52 ubuntu test-service[2480]: START
Nov 08 13:19:57 ubuntu test-service[2480]: WORKING
@jelly jelly requested a review from martinpitt November 8, 2023 14:15
@jelly jelly marked this pull request as ready for review November 8, 2023 14:15
@jelly
Copy link
Member Author

jelly commented Nov 8, 2023

All test failures so far are unrelated. Re-trying.

Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this all feels a bit brittle, but let's see if it works better. Thanks!

@martinpitt martinpitt merged commit 107c855 into cockpit-project:main Nov 8, 2023
91 checks passed
@jelly jelly deleted the journal-logs-flake branch November 9, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants